package com.songlanyun.modules.usercard.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.songlanyun.common.drive.IBaseService;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.modules.usercard.entity.UserCardEntity;
import com.songlanyun.modules.usercard.mobel.UserCardConfirmDto;
import com.songlanyun.modules.usercard.mobel.UserCardDto;
import com.songlanyun.modules.usercard.mobel.UserCardRemoveDto;

import java.util.List;
import java.util.Map;

/**
 * 用户绑定的银行卡（为了快捷支付）
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2023-03-22 11:16:38
 */
public interface UserCardService extends IBaseService<Long,UserCardEntity> {

    PageUtils queryPage(Map<String, Object> params);

    UserCardEntity loadById(Long id,boolean tw);

    UserCardEntity loadByUserIdAndId(Long userId,Long id,boolean tw);

    UserCardEntity add(Long userId, UserCardDto dto);

    void createCardConfirm(Long userId, UserCardConfirmDto dto);

    void setValidAndTokenNo(String memberId,String applyId,String tokenNo);

    void setNoValidAndTokenNo(String memberId,String applyId);

    UserCardEntity loadByApplyId(String applyId, boolean tw);

    void delete(UserCardRemoveDto dto);

    void deleteByToKenNo(String memberId, String tokenNo);

    void setNoValidByTokenNo(String memberId, String tokenNo);

    List<UserCardEntity> loadList(Long userId, Integer valid);
}

